Programming Quiz [closed]
        Posted  
        
            by arin-s-rizk
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by arin-s-rizk
        
        
        
        Published on 2010-03-26T16:29:08Z
        Indexed on 
            2010/03/26
            16:33 UTC
        
        
        Read the original article
        Hit count: 240
        
programming-languages
Hi one of my mates sent me this quiz see if you can guess the answers I will post mine later. In this quiz, some tasks related to the compilation process are listed. For each one of them, specify the part of the compiler that is responsible of performing it. Here are the possible answers:
- Lexical analyzer
 - Parser
 - Semantic analyzer
 - None of the above
 
Just fill the right choice (the number only) in the blank after each task:
Checking that the parentheses in an expression are balanced _ _ _ _ _
Removing comments from the program _ _ _ _ _
Grouping input characters into "tokens" _ _ _ _ _
Reporting an error to the programmer about a missing (
;) at the end of a C++ statement _ _ _ _ _Checking if the type of the RHS (Right-Hand Side) of an assignment (
=) is compatible with the LHS (Left-Hand Side) variable _ _ _ _ _Converting the (AST) Abstract Syntax Tree into machine language _ _ _ _ _
Reporting an error about a strange character like '
^' in a C++ program _ _ _ _ _Optimizing the AST _ _ _ _ _
© Stack Overflow or respective owner